<template>
  <view>
    <u-popup v-model="value" mode="bottom" :popup="false" @close="handleClose">
      <view
        class="flex align-center"
        style="padding-top: 30rpx; padding-bottom: 14rpx; width: 100%"
      >
        <view class="flex-1 flex align-center justify-center fd-column">
          <u-image
            @click="handleShare('WXSceneSession')"
            class="flex-1"
            src="@/static/image/news/wechat.png"
            width="100rpx"
            height="100rpx"
          />
          <text>微信</text>
        </view>
        <view class="flex-1 flex align-center justify-center fd-column">
          <u-image
            @click="handleShare('WXSenceTimeline')"
            src="@/static/image/news/friends.png"
            width="100rpx"
            height="100rpx"
          />
          <text>朋友圈</text>
        </view>
      </view>
      <u-gap height="20" bg-color="#F8F8F8"></u-gap>
      <view class="share-btn" @click="handleClose">取消</view>
    </u-popup>
  </view>
</template>

<script>
import uImage from "../../uview-ui/components/u-image/u-image.vue";
export default {
  components: {
    uImage,
  },
  props: {
    value: {
      type: Boolean,
      default: false,
    },
  },
  watch: {
    value(newValue, oldValue) {
      this.$emit("input", newValue);
    },
  },
  name: "Share",
  data() {
    return {};
  },
  methods: {
    handleClose() {
      this.$emit("input", false);
    },
    handleShare(value) {
      this.$emit("share", value);
    },
  },
};
</script>

<style scoped lang="scss">
text {
  font-size: 24rpx;
  font-weight: 400;
  line-height: 34rpx;
  color: #666666;
  margin-top: 10rpx;
}

.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2b84e4;
  font-size: 36rpx;
  font-family: Source Han Sans CN;
  font-weight: 400;
  line-height: 62px;
  height: 116rpx;
}
</style>
